<?php

namespace App\Modules\Admin\Http\Controllers\Property;

use App\Modules\Admin\Http\Controllers\BaseController;
use App\Modules\Admin\Http\Requests\Property\MaintenanceRequest;
use App\Modules\Admin\Services\Property\CheckItemService;
use App\Modules\Admin\Services\Property\MaintenanceService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class MaintenanceController extends BaseController
{
    public function __construct(MaintenanceService $configService)
    {
        $this->service = $configService;
    }

    public function indexs(CheckItemService $service,Request $request): JsonResponse
    {
        $result = $service->getSelectLists($request);
        return $this->successJson($result, $this->service->getError());
    }
    public function create(MaintenanceRequest $request): JsonResponse
    {
        return $this->createService($request);
    }

    public function update(MaintenanceRequest $request): JsonResponse
    {
        return $this->updateService($request);
    }
    public function getSelectlists(Request $request): JsonResponse
    {
        $result = $this->service->getSelectlists($request);
        return $this->successJson($result, $this->service->getError());
    }

}
